import type { RouteRecordRaw } from "vue-router";

function Layout() {
  return import("@/layouts/index.vue");
}

const routes: RouteRecordRaw = {
  path: "/customer",
  component: Layout,
  redirect: "/customer/list",
  name: "customer",
  meta: {
    title: "客户信息",
    icon: "iconfont icon-customer",
  },
  children: [
    {
      path: "list",
      name: "list",
      component: () => import("@/views/customer/list/index.vue"),
      meta: {
        title: "客户列表",
      },
    },
    {
      path: "card",
      name: "card",
      component: () => import("@/views/customer/card/index.vue"),
      meta: {
        title: "卡片列表",
      },
    },
    {
      path: "deposit",
      name: "deposit",
      component: () => import("@/views/customer/deposit/index.vue"),
      meta: {
        title: "入金记录",
      },
    },
    {
      path: "capitalFlow",
      name: "capitalFlow",
      component: () => import("@/views/customer/capitalFlow/index.vue"),
      meta: {
        title: "客户资金流水",
      },
    },
    {
      path: "balanceFlow",
      name: "balanceFlow",
      component: () => import("@/views/customer/balanceFlow/index.vue"),
      meta: {
        title: "客户可消费余额流水",
      },
    },
    {
      path: "limit",
      name: "limit",
      component: () => import("@/views/customer/limit/index.vue"),
      meta: {
        title: "客户卡额度调整记录",
      },
    },
  ],
};

export default routes;
